package br.com.registrofinancas.view;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.ListView;
import br.com.registrofinancas.R;
import br.com.registrofinancas.adapters.CategoryMovimentationItemRowAdapter;
import br.com.registrofinancas.controller.CategoryActivityController;

/**
 * Activity utilizada para gerenciar Categorias.
 */
public class CategoryActivity extends Activity {

	/**
	 * {@inheritDoc}
	 */
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_category);
		
		this.setupListeners();
	}
	
	/**
	 * Configura todos os listeners utilizados por esta Activity.
	 */
	protected void setupListeners() {
		ImageView imgMoveLeft = (ImageView)findViewById(R.id.activity_category_ll_date_bt_move_left);
		imgMoveLeft.setOnClickListener(CategoryActivityController.getInstance());
		
		ImageView imgMoveRight = (ImageView)findViewById(R.id.activity_category_ll_date_bt_move_right);
		imgMoveRight.setOnClickListener(CategoryActivityController.getInstance());
		
		// Items -- remove
		Object[] objList = new Object[2];
		objList[0] = new Object();
		objList[1] = new Object();
		// Items end
		
		ListView lvMovimentationList = (ListView) findViewById(R.id.activity_category_ll_movimentation_lv_list);
		// set listener para lvMovimentationList
		CategoryMovimentationItemRowAdapter adapter = new CategoryMovimentationItemRowAdapter
				(this, R.layout.activity_category_expense_rowlayout, objList);
		lvMovimentationList.setAdapter(adapter);
	}
	
}
